<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div style="margin: auto;text-align: center">
    <table style="margin: auto">
        <tr>
            <td><h2>核酸检测系统</h2></td>
        </tr>
        <tr>
            <td>
                <form th:action="@{/getAll}" method="get">
                    <select name="hoospitalId" id="selectId">
                        <option value="0">--请选择机构--</option>
                        <option th:selected="${hoospitalId==hospital.id}" th:value="${hospital.id}" th:text="${hospital.name}" th:each="hospital:${Hospitals}"></option>
                    </select>
                    <input type="submit" value="查询"/>
                    <div style="float: right"><input type="button" value="添加" onclick="window.location.href='add.html'"></div>
                </form>
            </td>
        </tr>
        <tr>
            <td>
                <table border="1" style="margin: auto">
                    <tr>
                        <th>被检测人</th>
                        <th>被检测人手机号码</th>
                        <th>被检测人身份照号</th>
                        <th>检测机构</th>
                        <th>检测日期</th>
                        <th>检测结果</th>
                        <th>操作</th>
                    </tr>
                    <tr th:each="h:${list}">
                        <td th:text="${h.assayUser}"></td>
                        <td th:text="${h.phone}"></td>
                        <td th:text="${h.cardNum}"></td>
                        <td th:text="${h.hospitalName}"></td>
                        <td th:text="${#dates.format(h.assayTime,'yyyy-MM-dd')}"></td>
                        <td th:text="${h.assayResult==1?'确诊':'检测中'}"></td>
                        <td>
                            <a href="">确诊</a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
</body>
</html>